<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>流程图-预览</title>
    <!--[if lt IE 9]>
    <?import namespace="v" implementation="#default#VML" ?>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/plug-in/GooFlow1.1/codebase/GooFlow.css"/>
    <script type="text/javascript" src="data2.js"></script>
    <script type="text/javascript" src="/plug-in/GooFlow1.1/plugin/jquery.min.js"></script>
    <script type="text/javascript" src="/plug-in/GooFlow1.1/codebase/GooFunc.js"></script>
    <script type="text/javascript" src="/plug-in/GooFlow1.1/plugin/json2.js"></script>
    <script type="text/javascript" src="/plug-in/GooFlow1.1/codebase/GooFlow.js"></script>
    <script type="text/javascript" src="/plug-in/GooFlow1.1/codebase/GooFlow.color.js"></script>

    <script type="text/javascript" src="/plug-in/GooFlow1.1/plugin/promise.min.js"></script>
    <script type="text/javascript" src="/plug-in/GooFlow1.1/plugin/html2canvas.min.js"></script>
    <!--[if lte IE 11]-->
    <script type="text/javascript" src="/plug-in/GooFlow1.1/plugin/canvg.js"></script>
    <!--[endif]-->
    <script type="text/javascript" src="/plug-in/GooFlow1.1/codebase/GooFlow.export.js"></script>
<style>
</style>
<title>流程设计</title>
<script>
/*当前流程主键*/
var property= {
     width:1000,
     height:540,
     toolBtns:["start round mix","end round","task","node","chat","state","plug","join","fork","complex mix"],
     haveHead:true,
     headLabel:true,
     headBtns:["reload","print"],//如果haveHead=true，则定义HEAD区的按钮
     haveTool:false,
     haveGroup:true,
     useOperStack:true
 };
 $(function(){
	 var design = $.createGooFlow($("#demo"),property);
	 design.setNodeRemarks(property.remark);
	 design.loadData({});

	 $.extend(design,{
		//导出图片功能 END
		 onPrintClick: function(){
			 var exportName = $("input[name=exportName]").val();
			 this.exportDiagram(exportName);
		 },
		 onFreshClick:function(){
			 var _this = this;
			 $.getJSON('/console/jFormFlow/rewrite/getJson', {'flowId':'${param.flowId}'}, function(json){
				if(json && json.data){
					_this.setTitle(json.data.flowName + '-在线预览');
					$("input[name=exportName]").val(json.data.flowName);
				}
				if(json && json.data && json.data.flowJson){
					var flowJson = json.data.flowJson || {} ;
					flowJson = JSON.parse(flowJson);
					_this.loadData(flowJson);
				}
			 });
		 }
	 });
	 
	 $("#demo .GooFlow_head .ico_reload").click();
	 
 });
</script>
</head>
<body  class="easyui-layout">
	<input type="hidden"  name="exportName" value="流程图打印预览"  />
	<div region="center" border="false">
		<div id="demo" style="margin:10px"></div>
		<div id="fff"></div>
	</div>
</body>
</html>